<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: lightblue;
        }
    </style>
</head>

<body>
    <img src="./img/01.jpg" alt="" srcset="">
    <div></div>
    <script src="js/fastclick.js"></script>
    <script>

        var time = null
        // dom结构完善之后 该事件触发
        document.addEventListener('DOMContentLoaded', function() {
            // console.log('DOMLoaded')
            // time = Date.now()
            FastClick.attach(document.body);
        })

        var div = document.querySelector('div')
        div.addEventListener('click', function() {
            console.log(1)
        })

        // window.addEventListener('load', function(){
        //     console.log('Window loaded')
        //     console.log(Date.now() - time)
        // })



        // document.addEventListener('DOMContentLoaded', function() {
        //     FastClick.attach(document.body)
        // })

        // var div = document.querySelector('div');
        // div.addEventListener('click', function() {
        //     console.log(1);
        // })
    </script>
</body>

</html>